Skip to content

fix: keep the Einsatzstelle and Kartenpakete out of Android backup - #80

Merged
ChrArlt merged 1 commit into
mainfrom
fix/backup-einsatz-data
Nov 22, 2026
Merged

ChrArlt merged 1 commit into
mainfrom
fix/backup-einsatz-data

Conversation

@ChrArlt

@ChrArlt ChrArlt commented Nov 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

FwAssist never configured Android backup, so the default Auto Backup copied all of the app's preferences and files into the user's Google account. Two things should not go there:

  • The Einsatzstelle. The Hydrantenkarte keeps it as hydranten.einsatzstelle ("lat,lon"). It marks where a real Einsatz is, and AGENTS.md treats Einsatz data as confidential.
  • The Kartenpakete under files/maps/. They can push the app past Android's 25 MB backup quota, and then Android backs up nothing at all.

The small preferences, such as the Funkalphabet table and the helper order, keep going to backup, so they still follow the user to a new phone.

Changes

  • HelperServices.DeviceOnlySettings: a new optional IHelperSettings for values that must never leave the phone. Every existing caller is unchanged.
  • HydrantenModule gives the Hydrantenkarte the device-only settings. An Einsatzstelle saved by 0.2.1 or older moves over the first time the helper opens, so an update made mid-Einsatz keeps the pin. The old copy is then blanked in the backed-up file.
  • Android head:
    • AndroidHelperSettings now takes its file name: helper-settings (backed up) or helper-settings-device (device-only).
    • New Resources/xml/data_extraction_rules.xml (Android 12+) and backup_rules.xml (Android 11 and older) exclude helper-settings-device.xml and maps/ from cloud backup.
    • A device-to-device transfer to the user's own new phone still carries everything.
  • AGENTS.md § Helpers: Einsatz data goes through DeviceOnlySettings.

No new permission, and no change to the Play data-safety answers: the app still sends nothing. The backup paragraph of the policy page (CodeForFire/codeforfire.github.io#30) can then say that the Einsatzstelle and the Kartenpakete are not backed up.

Test plan

  • New tests, written first and failing before the change:
    • HydrantenModuleTests: where the Einsatzstelle is read and written, the move from the old file, and which copy wins;
    • BackupRulesTests: the manifest names both rule files, and both exclude the device-only file and maps/.
  • Clean build, all tests and the format check (the make ci steps run directly): 11 test assemblies, 0 warnings.
  • APK built (Debug, portable toolchain). aapt2 dump shows dataExtractionRules and fullBackupContent in the manifest, and both rule files packaged under res/xml/.
  • make codeql: not run, because the script has no CodeQL bundle for Windows; the PR's CodeQL check covers it.
  • On an emulator: set an Einsatzstelle, run adb shell bmgr backupnow de.codeforfire.helfer, and check the backup holds helper-settings.xml but not helper-settings-device.xml or maps/. Not done yet.

No UI change, so no screenshots.

🤖 Generated with Claude Code

Android's Auto Backup copied all of the app's preferences and files
into the user's Google account, including the Hydrantenkarte's
Einsatzstelle, which is where a real Einsatz is. It also copied the
Kartenpakete under files/maps, which can push the app past the backup
quota, after which Android backs up nothing at all.

Backup rules exclude whole files, not keys, so the Einsatzstelle moves
to a second preferences file, helper-settings-device, reached through
the new HelperServices.DeviceOnlySettings. data_extraction_rules.xml
(Android 12+) and backup_rules.xml (older) exclude it and maps/ from
cloud backup; a device-to-device transfer still carries everything.
An Einsatzstelle saved by 0.2.1 or older moves over on first open and
is blanked in the backed-up file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Christian Arlt <[email protected]>
@coderabbitai

coderabbitai Bot commented Nov 22, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@ChrArlt
ChrArlt merged commit 646456b into main Nov 22, 2026
19 checks passed
@ChrArlt
ChrArlt deleted the fix/backup-einsatz-data branch November 22, 2026 14:04
DeepDiver1975 added a commit to CodeForFire/codeforfire.github.io that referenced this pull request Nov 22, 2026
Since the Hydrantenkarte (FwAssist 0.2.0) the app asks for Internet,
Standort and Vibration, so "kein Netzzugriff, keine Berechtigungen" was
no longer true. The policy now says what each permission is for, lists
what the newer helpers keep (Hydrantenkarte, Kennzeichnungen,
Strahlenschutz, Sandsack, helper order) and notes that from 0.3.0
Android's cloud backup leaves out the Einsatzstelle and the Kartenpakete
(CodeForFire/FwAssist#80). The FwAssist start page gets the same fix.

Co-authored-by: ChrArlt <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Thomas Müller <[email protected]>
DeepDiver1975 added a commit to CodeForFire/codeforfire.github.io that referenced this pull request Nov 22, 2026
* docs: add FwAssist privacy policy

Google Play requires a privacy policy URL for the listing. This page
states what the app does: it stores no personal data, has no account,
requests no permissions and has no network access. It also lists the
few view preferences kept in app-private storage, and notes that
Android's own Google backup may copy them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Thomas Müller <[email protected]>

* docs: distinguish processing from storage in the FwAssist privacy policy

The Buchstabieralphabet processes what is typed, which can be a name,
in memory. Say so instead of claiming no personal data is processed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Thomas Müller <[email protected]>

* docs: describe FwAssist's permissions in the privacy policy

Since the Hydrantenkarte (FwAssist 0.2.0) the app asks for Internet,
Standort and Vibration, so "kein Netzzugriff, keine Berechtigungen" was
no longer true. The policy now says what each permission is for, lists
what the newer helpers keep (Hydrantenkarte, Kennzeichnungen,
Strahlenschutz, Sandsack, helper order) and notes that from 0.3.0
Android's cloud backup leaves out the Einsatzstelle and the Kartenpakete
(CodeForFire/FwAssist#80). The FwAssist start page gets the same fix.

Co-authored-by: ChrArlt <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Thomas Müller <[email protected]>

---------

Signed-off-by: Thomas Müller <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Co-authored-by: ChrArlt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant